P(Bi)
is also known as prior probability. Prior probability, in Bayesian
statistics, is the probability of an event before new data is
collected. A is
composed of the sum of all the exclusive events, and P(A) is called total
probability.
设{B1, B2, ...Bn}是样本空间Ω的一个分割,A为Ω的一个事件,则(全概率公式 Law of
Total Probability)
img
Proof:
Since B1, B2, ...Bn
are mutually exclusive, AB1, AB2, ...ABn
are also mutually exclusive. Therefore, by addition theorem and
multiplication theorem we can get
1.8.1
独立事件的条件概率 Conditional Probability of Independent events
If P(A) > 0,
then the equivalent condition of events A and B being mutually independent
P(B) = P(B|A)
1.9 重要公式与结论
若相独立,则
Chapter
2 随机变量及其分布 Random Variables and Their Distribution
2.1 随机变量的概念 Random
Variable
随机变量 Random
variable:值随机会而定的变量,研究随机试验的一串事件。可按维数分为一维、二维至多维随机变量。按性质可分为离散型随机变量以及连续型随机变量。A
random variable is a function that assigns numeric values to different
events in a sample space.
离散型随机变量 discrete random
variables:设X为一随机变量,如果X只取有限个或可数个值,则称X为一个(一维)离散型随机变量。A
random variable for which there exists a discrete set of numeric values
is a discrete random variable.
概率函数:设X为一随机变量,其全部可能值为{a1, a2, ...},则pi = P(X=ai), i = 1, 2, ...称为X的概率函数。
定义:A discrete random variable X is said to follow the Bernoulli’s
distribution, which is denoted by X ∼ B(1,p), if
P{X = 1} = p, P{X = 0} = 1 − p. (0<P<1)
Bernoulli’s distribution is associated with the trial which has
only two possible outcomes (A
and ) that are not
necessarily equally likely.
Let the random variable X = {thenumberofoutcomeAoccurs}.
Then
作为二项分布的近似。若X ∼ B(n,p),其中n很大,p很小,而np = λ不太大时(一般n > 30, np ≤ 5),则X的分布接近泊松分布P(λ). Binomial
distribution: there are a finite number of trials n, and the number of
events can be no larger than n. Poisson distribution: the number of
trials is essentially infinite and the number of events can be
indefinitely large.
Theorem: Let λ > 0
be a constant. Suppose n is
any positive integer and λ = npn.
Then for any nonnegative integer k, we have
The Poisson approximation theorem suggests: If n is large and p is small (generally n ≥ 30, p ≤ 0.2), we
have
推导:
若事件A ∼ B(n,p),且n很大,p很小,而np = λ不太大时,设λ = np,
2.3
连续型随机变量及其分布 Continuous Random Variables
连续型随机变量 continuous random
variable:设X为一随机变量,如果X不仅有无限个而且有不可数个值,则称X为一个连续型随机变量。A random
variable whose possible values cannot be enumerated is a continuous
random variable.
概率密度函数 probability-density function:
定义:The probability density function f(x) of the continuous
random variable X is a
function whose integral from x = a to x = b(∀a,b∈Randb≥a)
gives the probability that X
takes a value in the interval (a, b],
i.e. 设连续型随机变量X有概率分布函数F(x),则F(x)的导数f(x) = F′(x)称为X的概率密度函数。
P{a < X ≤ b} = ∫abf(X) dx
性质:
F(x) is a
continuous function;
对于任意的 − ∞ < a ≤ b < + ∞,有P(a≤X≤b) = F(b) − F(a) = ∫abf(x)dx;
F′(x) = f(x);
对于任意的 − ∞ < x < + ∞,有P(X=x) = ∫xxf(u)du = 0.
注:
对于所有的 − ∞ < x < + ∞,有f(x) ≥ 0;
∫−∞+∞f(x)dx = 1;
假设有总共一个单位的质量连续地分布在a ≤ x ≤ b上,那么f(x)表示在点x的质量密度且∫cdf(x)dx表示在区间[c,d]上的全部质量。
The distribution function of normal distribution is
From the symmetry of density function of normal distribution, we know
that F(μ) = 0.5 2. We
indicated that parameters μ, σ2 are,
respectively, the expected value and variance of the normal
distribution, i.e., if X ∼ N(μ,σ2),
then E(X) = μ, D(X) = σ2
3. A normal distribution with parameters μ, σ2 is
completely determined by its expected value and variance.
The standard normal distribution is symmetric about x = 0.
Thanks to the widespread use of normal distribution, values of
normal distribution function are tabulate for positive values of x. The table is called normal
table.
Φ(x) = P{X ≤ x} =
area to the left of x
Obviously, Φ(0) = 0.5.
If X ∼ N(0,1),
then P{a < X ≤ b} = Φ(b) − Φ(a)
For the negative values of x, since symmetry properties of
standard normal distribution and the area between the density curve and
x-axis of equals 1, it follows that Φ(−x) = 1 − Φ(x).
Conversion from an N(μ,σ2)
distribution to an N(0,1)
distribution:
We convert the normal variable X to its standardized variable , then we have
Theorem: If X ∼ N(μ,σ2)
and F(x) is the
distribution function of X,
then
Proof:
If X ∼ N(μ,σ2),
then
Probabilities for any normal distribution can now be evaluated using
the normal table. 3. If X ∼ N(μ,σ2),
then
When k = 1, 2, 3,
Upper percentile of standard normal distribution
Definition: Given α and
X ∼ N(0,1), if
then uα
is called the upper 100 × αth
percentile 上侧 α 分位数 or
critical value 临界值 of a standard normal distribution N(0,1).
Given α, it follows
that Φ(uα) = P{X ≤ uα} = 1 − P{X > uα} = 1 − α.
And uα can
be obtained from referring to normal table.
For example, if α = 0.05,
then . Refer to normal table, u * α = 1.645.
Assume X ∼ N(μ,σ2).
If P{X > x0} = α
then x0 is the
upper 100 × αth percentile or
critical value of a normal distribution N(μ,σ2)
在一个统计问题里,研究对象的全体叫做总体,构成总体的每个成员称为个体。All
the possible observations of a trial is called population. Each
observation is called individual.
根据个体的数量指标数量,定义总体的维度,如每个个体只有一个数量指标,总体就是一维的,同理,个体有两个数量指标,总体就是二维的。总体就是一个分布,数量指标就是服从这个分布的随机变量。
总体根据个体数分为有限总体和无限总体,当有限总体的个体数充分大时,其可以看为无限总体。
As each individual of the population is the observation of a trial, it
is also can be considered as the value of a certain random variable.
Thus a population corresponds to a random variable X. From now on, we make no
distinction between a population and a random variable, and it is
generally referred to as population X (笼统称为总体X)
简单随机样本 simple random sample: If carry out
a trial repeatly and independently for n times and obtain n
observations: X1, X2, ..., Xn,
Then these n observations X1, X2, ..., Xn
can be regarded as n random
variables and is called a simple random sample 简单随机样本 of the
population X, which has two
properties:
X1, X2, ...Xn
are independent;
X1, X2, ...Xn
have the same distribution as the that of the population. > Xis are
independent and identically distributed (i.i.d.) 独立同分布.
To perform statistical inference, we construct appropriate
functions of the sample to draw conclusions rather than random sample
itself. Let X1, X2, ..., Xn
be a random sample drawn from population X. Then ϕ(X1,X2,...,Xn)
is called a statistic 统计量, if ϕ(X1,X2,...,Xn)
is just a function of X1, X2, ..., Xn
without any unknown parameters 未知参数.
For example: Assume X ∼ N(μ,σ2)
with parameter μ unknown and
σ known. Then is a
statistic but
is not a statistic.
As X1, X2, ..., Xn
are random variables, the statistic ϕ(X1,X2,...,Xn)
is also a random variable.
Let X1, X2, ..., Xn
be a random sample drawn from population X. Frequently used statistics:
sample mean and sample variance.
When generally referring to a sampling results,sample X1, X2, ..., Xn
are n random variables,and then X and S2 are also random
variables. 当泛指一次抽样结果时,样本X1, X2, ..., Xn是n个随机变量,则样本均值、样本方差等统计量也是随机变量;
When specifically referring to a specific sampling results,
observations X1, X2, ..., Xn
are n specific numbers, and then X and S2 are also specific
numbers.当特指一次具体的抽样结果时,样本值X1, X2, ..., Xn是n个具体数值,从而样本均值X̄、样本方差S2等统计量也是具体的数值所以,后面不引起混淆的情况下,对样本和统计量赋予双重意义:泛指时为随机变量,特指时为相应数值。
抽样分布
Sampling distribution of a statistic: the distribution of the
statistic. 统计量作为随机变量所服从的分布.
The sampling distribution of sample mean (If population variance
σ2 is known)
Let X1, X2, …, Xn
be a random sample from some population X with mean E(X) = μ and
variance D(X) = σ2.
Then
Because normal distribution is one of the most common distributions,
we consider the sampling distribution of sample mean X̄ with samples drawn from normal
population.
Theorem: If X1, X2, …, Xn ∼ N(μ,σ2)
and are independent, then
If we standardize X̄, then
creating a new random variable
Definition: if χ2 = X12 + X22 + ... + Xn2,
where X1, X2, ..., Xn ∼ N(0,1)
and the Xi’s are
independent, then the statistic χ2 is said to follow a
χ2 distribution
with n degrees of freedom,
which is denoted by χ2 ∼ χ2(n).
The degree of freedom is the number of independent random
variables in a statistic. It is often denoted by df and defined as
follows:
df = n − r
Where n is the number of
random variables in a statistic, r is the number of constraint
conditions 约束条件 of these random variables.
For example: There are n random variables Xi − X̄, i = 1, …, n,
and these random variables satisfy a constraint condition:
Thus, the degrees of freedom of S2 is df = n − 1.
If X ∼ N(0,1),
then X2 ∼ χ2(1)
。
Assume X ∼ N(μ,σ2).
First standardize X, then
Properties
The chi-square distribution only takes positive values and is
always skewed to the right.
The skewness diminishes as n increases.
When n → + ∞, the
distribution of χ2(n) approaches
a normal distribution.
If χ12 ∼ χ2(n1), χ22 ∼ χ2(n2)
and χ12
and χ22
are independent, then χ12 + χ22 ∼ χ2(n1+n2)
E(χ2) = n, D(χ2) = 2n
Theorem 2: If X1, X2, …, Xn ∼ N(μ,σ2)
and are independent, then
X̄ and S2 are independent.
Remark: Standardize Xi, then and
However, if we substitute X̄ for μ in the above equation, then we
lose 1 degree of freedom (constraint condition: ). i.e., Recall Thus
Upper percentile of a χ2(n)
distribution
image-20241218180856268
Definition: The upper 100 × αth percentiles of a χ(n)
distribution (i.e., a chi-square distribution with ndf) is denoted
by χα2(n)
where
P{χ2 > χα2(n)} = α
4.5 t
分布
If normal population variance σ2 is known, then the
sample mean
If normal population variance σ2 is unknown, which can
be replaced by S2,
what will be the distribution of sample mean ?
Definition
If
Where X ∼ N(0,1), Y ∼ χ2(n)
and X and Y are independent, then statistic
t is said to follow a t distribution with n degrees of freedom, which is
denoted by t ∼ t(n).
Properties
t distribution is
symmetric about 0 but is more spread out than the N(0,1) distribution.
As n → + ∞, the t distribution converges 收敛 to an
N(0,1) distribution.
When n is large enough
(n ≥ 30), t distribution is approximated by a
N(0,1) distribution; when
n is small (n<30), these two distributions
make a large difference.
The sampling distribution of X̄ (if σ2 is unknown)
If population variance σ2 is unknown, we replace
population variance σ2 with sample variance
S2, and we have the
following theorem:
Theorem : If X1, X2, …, Xn ∼ N(μ,σ2)
with unknown σ2 and
they are independent, then
Proof: First
and X̄ and S2 are independent. Then
by the definition of t
distribution,
The sampling distribution of difference between two sample
means
When studying the statistical inference of the means (μ1,μ2)
of two normal populations, it is necessary to investigate the
distribution of the difference between the sample means (X̄,Ȳ) of the two normal
populations.
Theorem: Suppose X1, X2, …, Xn1 ∼ N(μ1,σ12), Y1, Y2, …, Yn2 ∼ N(μ2,σ22)
and these two random samples are independent. The means
and variances in these two samples are denoted by X̄. Ȳ and Sx2, Sy2
respectively.
Assume variances σ12, σ22
are known. Then
Assume variances σ12, σ22
are unknown but σ12 = σ22 = σ2.
Then where In particular, when n1 = n2,
we get .
Proof: Assume σ12 = σ22 = σ2.
Then . Besides,
and Sx2
and Sy2
are independent.
By the property of χ2 distribution, we
obtain
Also U、V are
independent, then
where
Upper percentile of t distribution
image-20241218180759435
Definition: The 100 × α
th percentile of a t
distribution with n degrees of
freedom is denoted by tα(n),
where
P{t>tα(n)} = α
When n ≤ 45 and α is small, we can refer to the
value of tα(n)
from t distribution
table.
When α is larger, it
follows from the definition of upper percentile and the symmetry
property of t distribution
that
t1 − α(n) = − tα(n)
When n > 45, tα(n)
can be approximated by the upper percentile of N(0,1), that is,
tα(n) ≈ uα
4.6 F 分布 F distribution
When studying the statistical inference of variances (σ12,σ22)of
two normal populations, it is necessary to investigate the distribution
of sample variances ratio (S12,S22)
of the two normal population.
First we introduce F distribution.
Definition:
If
Where X1 ∼ χ2(n1), X2 ∼ χ2(n2)
and X1, X2
are independent, then F is
said to follow a F
distribution with (n1,n2)
degrees of freedom, which is denoted by and n1 is referred to as
numerator 分子 df and
n2 denominator 分母
df.
Remark:
The F distribution is generally positively skewed and the shape of F
distribution depends both on the numerator and denominator df.
If a random variable X ∼ F(n1,n2),
then
Assume T ∼ t(n). Then
T2 ∼ F(1,n).
Recall: If X ∼ N(0,1), then X2 ∼ χ2(1).
Proof: If T ∼ t(n), then
there exist X ∼ N(0,1), Y ∼ χ2(n),and
X、Y are independent
such that which gives here X2 ∼ χ2(1), Y ∼ χ2(n),
and X2, Y
are independent, thus we get T2 ∼ F(1,n).
The sampling distribution of two-sample variances ratio
Theorem: Suppose X1, X2, …, Xn1 ∼ N(μ1,σ12), Y1, Y2, …, Yn2 ∼ N(μ2,σ22)
and these two random samples are independent. Also suppose the variances
in these two samples are denoted by Sx2,
Sy2
respectively. Then
In particular, when σ12 = σ22,
we get
Proof: First , and Sx2
and Sy2
are independent.
Using the definition of F distribution,
i.e.,
Upper percentile of F distribution
Definition: The 100 × α
th percentile of an F
distribution with n1, n2
degrees of freedom is denoted by Fα(n1,n2),
where
P{F>Fα(n1,n2)} = α
Remark:
If α(=0.1,0.05,0.025,0.01)
is small, then refer to F
table to get upper percentile of F distribution.
If α(=0.9,0.95,0.975,0.99)
is larger, then use F1 − α(n1,n2)=.
Proof: Using the definition of upper percentile of F distribution, P{F>F1 − α(n1,n2)} = 1 − α,
which derives
Then Since
, it follows that i.e.,
.
Chapter 5 参数估计
Parameter Estimation
统计学与概率论的区别就是归纳和演绎,前者通过样本推测总体的分布,而后者已知总体分布去研究样本。因此参数估计则是归纳的过程,参数估计有两种形式:点估计和区间估计(点估计和区间估计都是对于未知参数的估计,而点估计给出的是一个参数可能的值,区间估计给出的是参数可能在的范围)。
- Point estimation 点估计: specify a values as the estimates of
population unknown parameters. i.e., sample mean of a certain sampling
can be the estimate of population mean. - Interval estimation
区间估计:specify a range within which the true population parameter are
likely to fall. This type of problem involves interval estimation.
Definition: Suppose θ is an
unknown parameter of some population X. Let X1, X2, ..., Xn
be a random sample drawn from population X, and x1, x2, ..., xn
be a set of corresponding observations.
Now construct an appropriate statistic θ̂(X1,X2,...,Xn)
to estimate θ with its value
θ̂(x1,x2,...,xn).
Then the function θ̂(X1,X2,...,Xn)
is called an estimator 估计量 of θ and the value θ̂(x1,x2,...,xn)
is called an estimate 估计值 of θ. - The estimator as a statistic is
a random variable. - The estimate of an estimator will
vary with the different observations of sample.
5.1.2 点估计的方法
矩估计
Let X1, X2, …, Xn
be a random sample drawn from some population which follows a uniform
distribution over interval [0,θ]. Find the estimator of unknown
parameter θ.
To solve this problem, we need to introduce the method of moments
矩估计法.
The first uncorrected moment E(X) is simply the expected
value. The second corrected moment E[(X−E(X))2]
is the variance. The second uncorrected moment E(X2) = D(X) + [E(X)]2.
The idea of the method of moments:
The sample moment 样本矩 is used
as the estimator of the corresponding population moment
总体矩 E(Xs).
Assume F(x;θ1,θ2,...,θr)
is the distribution function of population X, where parameters θ1, θ2, ..., θr
are unknown. Also assume E(Xk)(k=1,2,...,r)
exist。
Using the method of moments, the moment estimators θ̂1, θ̂2, ..., θ̂r
are obtained by equating the first r sample moments to the corresponding
first r population moments and solving for θ1, θ2, ..., θr
More precisely,
when estimating single parameter, it is suffice to solve the
following single equation:
When estimating two parameters, two estimating equations will be
needed:
则称θ̂是θ的无偏估计,否则称为有偏估计。无偏性的要求也可以改写为Eθ(θ̂−θ) = 0,无偏性表示表示估计参数与真实参数没有系统偏差。Definition:
An estimator θ̂ of a parameter
θ is unbiased if E(θ̂) = θ. This
means that the average value of θ̂ over a large number of repeated
samples of size n is θ.
Sample mean is an unbiased estimator of population mean
μ, i.e., E(X̄) = μ.
Sample variance is an unbiased estimator
of population variance σ2, i.e., E(S2) = σ2
Therefore in practice, we normally choose to use sample mean
X̄ 、 sample variance S2 as the estimators of
population mean μ, population
variance σ2
respectively, i.e.,
Definition: Assume the population parameter θ is unknown. If there are two
statistics θ̂1 = θ̂1(X1,X2,…,Xn), θ̂2 = θ̂2(X1,X2,…,Xn)
and θ̂1<θ̂2 such that for any
given α(0<α<1),
P{θ̂1<θ<θ̂2} = 1 − α
Then (θ̂1,θ̂2)
is called a 100% × (1−α) or
1 − α confidence interval
置信区间 for θ. Here 100% × (1−α) or 1 − α is referred to as confidence
level 置信水平.
θ is some determinate
number, θ̂1, θ̂2
are random variables, (θ̂1,θ̂2)
is random interval随机区间。
(θ̂1,θ̂2)
contains θ with a probability
of 1 − α, or the probability
of (θ̂1,θ̂2)
containing θ is 1 − α.
The confidence intervals vary with the observations of sample. Any
one confidence interval from a particular sample may or may not contain
the unknown parameter θ.
Therefore, we can say over the collection of all 95% Cls that could
be constructed from repeated random samples of size n, 95 of all these intervals will
contain the parameter θ. The
remaining 5 % of all Cls will not contain the the parameter θ.
Test whether H0: μ = μ0
is correct or not by contradiction 反证法:
first assume that the null hypothesis H0 : μ = μ0
is true.
under H0, we
infer according to the sampling distribution theory and sample
information.
reject H0 if we
get contradictory conclusions based on small probability
principle; otherwise, accept H0.
Small probability principle 小概率原理: the event
with probability no more than 0.05 is almost impossible to occur in just
one trial.
假设可分为两种:1. 参数假设检验 parametric
test,即已经知道数据的分布,针对总体的某个参数进行假设检验
population distribution is known but population parameter is unknown;2.
非参数假设检验 nonparametric
test,即数据分布未知,针对该分布进行假设检验 population
distribution is unknown。
The null hypothesis 零假设,denoted by H0, is the hypothesis
that is to be tested. The null hypothesis is a statement of no change,
no effect or no difference and is assumed true until evidence indicates
otherwise.
The alternative hypothesis 备择假设,denoted by H1, is the hypothesis
that in some sense contradicts the null hypothesis and is a statement
that we are trying to find evidence to support.
In general, the null hypothesis is represented by the value of the
unknown population parameter is equal to some specific value, i.e.,
H0 : parameter =
some value
(H0: μ=μ0)
The alternative hypothesis is allowed to be either greater than or
less than some specific value. H1 : parameter ≠ some value two-tailed test 双侧检验 H1 : parameter > some value right(upper)-tailed test
单侧检验 H1 :
parameter < some value
left(lower)-tailed test 单侧检验
Definition: The probability of a type I error 第一类错误,which is
usually denoted by α, is the
probability of rejecting H0 when H0 is true, (“reject the
true” 拒真)
α = P{ type I error
} = P{ reject H0 when
H0 true }
Definition: The probability of a type II error 第二类错误, which is
usually denoted by β, is the
probability of accepting H0 when H1 is true, (“accept the
false” 取伪)
β = P{ type II error
} = P{ accept H0 when
H1 true }
可以证明的,在一定样本量下,两类错误概率无法共同减小,但是当样本增加时,可以同时减小。A
common practice is to limit α
first and then to determine sample size to make β as small as possible.
通常限制犯第一类错误的概率,然后适当确定样本容量使犯第二类错误的概率尽可能小。
注:一般以p < 0.05 为有统计学差异, p < 0.01
为有显著统计学差异,p < 0.001为有极其显著的统计学差异。
6.2 One-Sample
Hypothesis Testing 单样本假设检验
Tests of hypotheses based on one sample from N(μ,σ2)
One-sample u test for the
mean of N(μ,σ2)
with σ2 known
One-sample t test for the
mean of N(μ,σ2)
with σ2
unknown
One-sample χ2
test for the variance of N(μ,σ2)
Tests of hypotheses based on two samples
Two-sample paired t
test
Two-sample t test
Two-sample F test
One-sample u test for the mean of a normal distribution with
known variance: two-tailed case
Summarize the steps in below:
Establish hypothesis H0 : μ = μ0
vs. H1 : μ ≠ μ0
Calculate the value of test statistic
according to observations
Find for a
given significance level of α
Make statistical inference:
If ,
then H0 is rejected
at a significance level of α,
and it is considered that there is a significant difference between
μ and μ0.
If ,
then H0 is accepted
at a significance level of α,
and it is considered that there is no significant difference between
μ and μ0.
image-20241218185843654
One-sample u test for the mean of a normal distribution with
known variance: one-tailed case
Summarize the steps below:
Establish hypothesis
H0 : μ = μ0
vs. H1 : μ > μ0( or
H1:μ<μ0)
Calculate the value of test statistic according to observations
Find uα for a given
significance level of α
Make statistical inference:
If u > uα,
then H0 is rejected
at a significance level of α.
If u ≤ uα,
then H0 is accepted
at a significance level of α;
or (If u < − uα,
then H0 is rejected
at a significance level of α.
If u ≥ − uα,
then H0 is accepted
at a significance level of α.)
image-20241218190021954
One-sample t test for the mean of a normal distribution with
unknown variance
We want to test
H0 : μ = μ0
vs.
H1 : μ ≠ μ0
If the variance σ2 is unknown, we just
replace σ2 by
sample variance S2.
Under H0: μ = μ0,
we have
Then the steps for two-tailed t test, which is similar to
one-sample u test, is given
below:
Establish hypothesis H0 : μ = μ0
vs. H1 : μ ≠ μ0
Calculate the value of test statistic according to observations
Find
for a given significance level of α
Make statistical inference:
If , then
H0 is rejected at a
significance level of α. If
,
then H0 is accepted
at a significance level of α.
Remark: The above test procedure is called a t test because the test
statistic
image-20241218190503280
The steps for one-sample t test in one-tailed case
Establish hypothesis
H0 : μ = μ0
vs. H1 : μ > μ0( or
H1:μ<μ0)
Calculate the value of test statistic according to observations
Find tα for a given
significance level of α.
Make statistical inference:
If t > tα(n−1),
then H0 is rejected
at a significance level of α.
If t ≤ tα(n−1),
then H0 is accepted
at a significance level of α;
or If t < − tα(n−1),
then H0 is rejected
at a significance level of α.
If t ≥ − tα(n−1),
then H0 is accepted
at a significance level of α.)
image-20241218190646691
One-sample χ2 test for the variance
of a normal distribution
If X1, X2, …, Xn
are random sample from an N(μ,σ2)
distribution with unknown μ
and σ2.
We want to test the hypothesis
H0 : σ2 = σ02
vs.
H1 : σ2 ≠ σ02
Here σ02 is
known.
Under H0 : σ2 = σ02,
consider S2 is
unbiased estimator of σ2, we known that
Calculate the value of test statistic according to observations
Find χα/22(n−1)
and
for a given significance level of α.
Make statistical inference
If or
,
then H0 is rejected
at a significance level of α.
If , then H0 is accepted at a
significance level of α.
image-20241218134633679image-20241218191150037
6.3 Two-Samples
Hypothesis Testing 双样本假设检验
Introduction:
All the tests introduced before were one-sample tests: Test for mean:
one-sample u test, one-sample
t test Test for variance:
one-sample χ2 test.
Actually, a more frequently encountered situation is the two-sample
hypothesis testing problem.
These two samples can be paired 配对的 or can be completely
independent.
Definition: Two samples are said to be paired when each data
point in the first sample is matched and is related to a unique data
point in the second sample.
Definition: Two samples are said to be independent when each data
points in one sample are unrelated to the data points in the second
sample.
Remark
The two paired samples are not independent.
The paired samples may represent two sets of measurements.
On the same subject: in this case, each subject is used as its own
control
On different subjects: that are similar to each other in matching
criteria, such as age, twins and so on.
Paired t test for mean
Because the paired samples are not independent, we consider
the differencedi(i=1,2,…,n)
between these two sample points and then di(i=1,2,…,n)
can be regarded as a random sample from a new population.
The new population (i.e., all the possible differences) can be
understood as a result caused by many minute independent random factors,
and be regarded to follow a normal distribution N(μd,σd2),
here μd, σd2
are the population mean and population variance respectively.
To test whether there is a significant difference between
th-5321`2is two samples implies to test the whether population mean
μd = 0
Hence,
H0 : μd = 0
vs.
H1 : μd ≠ 0
The hypothesis testing problem is reduced to one-sample t test for mean with unknown
variance σd2
based on differences di(i=1,2,…,n).
The test statistic is
Where: d̄ is the sample mean
of differences di(i=1,2,…,n)Sd is the
sample standard deviation of differences di(i=1,2,…,n)n is the number of matched
pairs.
Two-sample t test for independent samples
Now we test the equality of two means of two independent samples.
Suppose X1, X2, …, Xn1 ∼ N(μ1,σ12), Y1, Y2, …, Yn2 ∼ N(μ2,σ22)
and these two random samples are independent. The means and variances in
these two samples are denoted by x̄, ȳ, S12, S22
respectively.
We want to test the hypothesis
H0: μ1 = μ2
vs.
H1 : μ1 ≠ μ2
We will base the significance test on the difference between the two
sample means, x̄ − ȳ.
Assume variances σ12, σ22
are known.
Frist from the sampling distribution of x̄ − ȳ, we have
Under H0: μ1 = μ2,
Then the test
H0: μ1 = μ2
vs.
H1 : μ1 ≠ μ2
can be performed similarly to one-sample u test using test
statistic
Assume variances σ1L, σ2L
are unknown and the variances are the same, i.e., σ12 = σ22 = σ2.
Similarly, to test H0 : μ1 = μ2,
we first consider the sampling distribution X̄ − Ȳ. From chapter 4 , we
know
where
Then the test
H0: μ1 = μ2
vs.
H1 : μ1 ≠ μ2
with equal variances can be performed similarly to one-sample t test using test statistic
with
Testing for the equality of two variances
In the following sections, we shall test
The equality of two variances 方差齐性检验
We want to test
H0 : σ12 = σ22
vs.
H1 : σ12 ≠ σ22
Similar to the idea of one-sample χ2 test for variance,
this test is also based on the ratio of sample variance rather than the
difference S12−S22
From the sampling distribution of in chapter 4 , we
have
Under H0 : σ12 = σ22,
it follows that
Now steps for the equality of two variances is given below.
Steps for F test
Establish hypothesis
H0 : σ12 = σ22
vs.
H1 : σ12 ≠ σ22
Calculate the value of test statistic according to
observations
(To simplify the calculation, we normally choose the larger variance
as numerator, such that ).
Find for a given significance level α.
Also, according to the property F distribution, we have
Reprint policy:
All articles in this blog are used except for special statements
CC BY-NC-SA 4.0
reprint policy. If reproduced, please indicate source
thyzzs
!